import { getReviewList } from '../../../utils/requestApi.js'
const app = getApp();
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    goodsComment: Object,
    prDid: String
  },

  /**
   * 组件的初始数据
   */
  data: {
    imgUrl: app.data.imgurl,
    listData: [],  //页面数据
  },

  ready: function () {
    this.initData();
  },


  /**
   * 组件的方法列表
   */
  methods: {
    //打开实拍页面
    onChange:function(e){
      this.triggerEvent('toChange',{id: 2})
    },

    initData: function () {
      let { prDid } = this.data;
      getReviewList({
        action: 'LoadReviewYinLiu',
        PageSize: '10',
        pageIndex: '1',
        ProductId: prDid
      }).then(res => {
        if (res.statusCode == 200) {
          this.setData({
            listData: res.data.Result.Data
          })
        }
      })
    },
  }
})
